// 应用配置文件
module.exports = {
  // 应用基本信息
  app: {
    name: 'Electron应用',
    version: '1.0.0',
    description: '通用的Electron应用模板',
    author: 'tianyu',
    homepage: 'https://example.com'
  },

  // 窗口配置
  window: {
    width: 1200,
    height: 800,
    minWidth: 800,
    minHeight: 600,
    center: true,
    resizable: true,
    maximizable: true,
    minimizable: true,
    closable: true,
    alwaysOnTop: false,
    fullscreenable: true,
    skipTaskbar: false,
    titleBarStyle: 'default',
    frame: true,
    transparent: false,
    vibrancy: 'none'
  },

  // 开发环境配置
  development: {
    devTools: true,
    openDevTools: true,
    hotReload: true,
    debug: true
  },

  // 生产环境配置
  production: {
    devTools: false,
    openDevTools: false,
    hotReload: false,
    debug: false
  },

  // 主题配置
  themes: {
    default: 'light',
    available: ['light', 'dark', 'blue', 'green', 'purple', 'orange', 'high-contrast'],
    autoDetect: true
  },

  // 语言配置
  languages: {
    default: 'zh-CN',
    available: ['zh-CN', 'en-US'],
    autoDetect: true
  },

  // 文件配置
  files: {
    maxFileSize: 100 * 1024 * 1024, // 100MB
    allowedExtensions: ['.txt', '.md', '.json', '.js', '.html', '.css'],
    autoSave: true,
    autoSaveInterval: 30000 // 30秒
  },

  // 安全配置
  security: {
    nodeIntegration: false,
    contextIsolation: true,
    enableRemoteModule: false,
    allowRunningInsecureContent: false,
    experimentalFeatures: false,
    webSecurity: true
  },

  // 更新配置
  updater: {
    enabled: true,
    autoDownload: false,
    autoInstallOnAppQuit: true,
    checkForUpdatesOnStart: true,
    updateCheckInterval: 24 * 60 * 60 * 1000 // 24小时
  },

  // 日志配置
  logging: {
    level: 'info',
    maxFileSize: 10 * 1024 * 1024, // 10MB
    maxFiles: 5,
    enableConsole: true,
    enableFile: true
  },

  // 性能配置
  performance: {
    enableHardwareAcceleration: true,
    enableGpuAcceleration: true,
    maxMemoryUsage: 512 * 1024 * 1024, // 512MB
    enableThrottling: true
  },

  // 快捷键配置
  shortcuts: {
    'CmdOrCtrl+N': 'new-file',
    'CmdOrCtrl+O': 'open-file',
    'CmdOrCtrl+S': 'save-file',
    'CmdOrCtrl+Shift+S': 'save-as-file',
    'CmdOrCtrl+W': 'close-window',
    'CmdOrCtrl+Q': 'quit-app',
    'F11': 'toggle-fullscreen',
    'CmdOrCtrl+R': 'reload',
    'CmdOrCtrl+Shift+R': 'force-reload',
    'F12': 'toggle-dev-tools'
  },

  // 菜单配置
  menu: {
    showFileMenu: true,
    showEditMenu: true,
    showViewMenu: true,
    showWindowMenu: true,
    showHelpMenu: true,
    showRecentFiles: true,
    maxRecentFiles: 10
  },

  // 系统托盘配置
  tray: {
    enabled: true,
    icon: 'assets/tray-icon.png',
    tooltip: 'Electron应用',
    showOnStartup: false,
    minimizeToTray: true,
    closeToTray: false
  },

  // 通知配置
  notifications: {
    enabled: true,
    showInSystemTray: true,
    playSound: true,
    duration: 5000
  },

  // 数据库配置
  database: {
    type: 'sqlite',
    path: 'data/app.db',
    backup: true,
    backupInterval: 24 * 60 * 60 * 1000 // 24小时
  },

  // API配置
  api: {
    baseUrl: 'https://api.example.com',
    timeout: 30000,
    retries: 3,
    enableCaching: true,
    cacheTimeout: 5 * 60 * 1000 // 5分钟
  }
};
